package com.cfec.ipoth_service.Controller;

import com.cfec.ipoth_service.mapper.FacialAnalysisMapper;
import com.cfec.ipoth_service.service.impl.FacialAnalysisServiceImpl;
import com.cfec.ipoth_service.util.ResultData;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

@RestController
@RequestMapping("/AI")
@ApiOperation("控制层:AI")
@Slf4j
public class AIController {

    @Resource(name = "facialAnalysisServiceImpl")
    private FacialAnalysisServiceImpl facialAnalysisServiceImpl;

    /**
     * 获取AI分析的该老人情绪结果
     * @return ai提供的建议
     */
    @RequestMapping("/getAiEmotion")
    public ResultData<Object> getAi(){
        return facialAnalysisServiceImpl.getAi();
    }
}
